﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="MatchCreator.aspx.cs" Inherits="SoccerEvaluator.WebSite.MatchCreator" %>

<%@ Register Assembly="SoccerEvaluator.WebSite" Namespace="SoccerEvaluator.WebSite"
    TagPrefix="cc1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="cmdDelete">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lstScores" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdAdd">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lstScores" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
        <img src="Images/ballanimated.gif" />
    </telerik:RadAjaxLoadingPanel>
    <table width="100%">
        <tr>
            <td>
            </td>
            <td nowrap="nowrap">
                <h1>
                    SERIE DE PARTIDOS</h1>
            </td>
        </tr>
        <tr>
            <td>
                Nombre
            </td>
            <td nowrap="nowrap">
                <asp:TextBox runat="server" ID="txtProjectName" Width="493px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtProjectName"
                    ErrorMessage="Ingrese nombre para el proyecto"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Puntuacion Resultado
            </td>
            <td nowrap="nowrap">
                <asp:TextBox ID="txtExactScore" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtExactScore"
                    ErrorMessage="Ingrese puntuacion para los resultados" ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Puntuacion Marcador
            </td>
            <td nowrap="nowrap">
                <asp:TextBox ID="txtCatchScore" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtCatchScore"
                    ErrorMessage="Ingrese puntos por resultado" ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Fecha
            </td>
            <td>
                <telerik:RadDatePicker ID="RadDatePicker1" runat="server">
                </telerik:RadDatePicker>
            </td>
        </tr>
        <tr>
            <td>
                Modo
            </td>
            <td>
                <telerik:RadComboBox ID="cmbProjectMode" runat="server" Height="40px" Width="396px">
                    <Items>
                        <telerik:RadComboBoxItem runat="server" Text="La serie no ha empezado, permitir ingresar resultados"
                            Value="0" />
                        <telerik:RadComboBoxItem runat="server" Text="Ya empezo la serie de partidos, no permitir mas registros"
                            Value="1" />
                    </Items>
                </telerik:RadComboBox>
            </td>
        </tr>
        <tr>
            <td>
                Encuentro
            </td>
            <td>
                Lugar:
                <asp:TextBox runat="server" ID="txtLocation"></asp:TextBox>
                &nbsp;<asp:DropDownList runat="server" ID="cmbLocal" Width="150px">
                </asp:DropDownList>
                &nbsp;VS
                <asp:DropDownList runat="server" ID="cmbVisitor" Height="16px" Width="150px">
                </asp:DropDownList>
                <asp:Button runat="server" ID="cmdAdd" Text="Adicionar" OnClick="cmdAdd_Click" />
            </td>
        </tr>
        <tr>
            <td>
                Proveedor:
                <asp:DropDownList runat="server" ID="cmbProviders">
                </asp:DropDownList>
                Año:
                <asp:TextBox runat="server" ID="txtYear" Text="2013"></asp:TextBox>
                Mes:
                <asp:DropDownList runat="server" ID="cmbMonth">
                    <asp:ListItem Value="1">Enero</asp:ListItem>
                    <asp:ListItem Value="2">Febrero</asp:ListItem>
                    <asp:ListItem Value="3">Marzo</asp:ListItem>
                    <asp:ListItem Value="4">Abril</asp:ListItem>
                    <asp:ListItem Value="5">Mayo</asp:ListItem>
                    <asp:ListItem Value="6">Junio</asp:ListItem>
                    <asp:ListItem Value="7">Julio</asp:ListItem>
                    <asp:ListItem Value="8">Agosto</asp:ListItem>
                    <asp:ListItem Value="9">Septiembre</asp:ListItem>
                    <asp:ListItem Value="10">Octubre</asp:ListItem>
                    <asp:ListItem Value="11">Noviembre</asp:ListItem>
                    <asp:ListItem Value="12">Diciembre</asp:ListItem>
                </asp:DropDownList>
                <asp:Button runat="server" ID="cmdUpdateScores" OnClick="cmdUpdateScores_Click" Text="Consultar"
                    CausesValidation="false" />
            </td>
        </tr>
        <tr>
            <div style="overflow: auto; height: 400px">
                <asp:Repeater runat="server" ID="lstProviderScores" OnItemDataBound="lstProviderScores_ItemDataBound">
                    <HeaderTemplate>
                        <table border="0" bordercolor="gray" cellpadding="3" cellspacing="0" width="800px">
                            <tr>
                                <td class="TableTitles">
                                    #
                                </td>
                                <td>
                                    <asp:Label ID="Label14" runat="server" Text="<% $ Resources:Resource, Asserts %>"
                                        CssClass="TableTitles"></asp:Label>
                                </td>
                                <td align="center" nowrap="nowrap">
                                    <asp:Label ID="Label8" runat="server" Text="<% $ Resources:Resource,Date %>" CssClass="TableTitles"></asp:Label>
                                </td>
                                <td align="center" nowrap="nowrap">
                                    <asp:Label ID="Label2" runat="server" Text="<% $ Resources:Resource, Location %>"
                                        CssClass="TableTitles"></asp:Label>
                                </td>
                                <td>
                                </td>
                                <td align="center">
                                    <asp:Label ID="Label4" runat="server" Text="<% $ Resources:Resource, Team %>" CssClass="TableTitles"></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="Label5" runat="server" Text="<% $ Resources:Resource, Goals %>" CssClass="TableTitles"></asp:Label>
                                </td>
                                <td>
                                </td>
                                <td align="center">
                                    <asp:Label ID="Label6" runat="server" Text="<% $ Resources:Resource, Team %>" CssClass="TableTitles"></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="Label7" runat="server" Text="<% $ Resources:Resource, Goals %>" CssClass="TableTitles"></asp:Label>
                                </td>
                            </tr>
                    </HeaderTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                    <ItemTemplate>
                        <tr runat="server" id="row">
                            <td align="center">
                                <%# Container.ItemIndex + 1 %>
                            </td>
                            <td width="60px" align="left">
                                <a href='MatchStatistics.aspx?Index=<%#DataBinder.Eval(Container.DataItem,"Index") %>'>
                                    <img runat="server" id="imgStadium" src="Images/stadium.gif" />
                                </a>
                            </td>
                            <td align="left" nowrap="nowrap">
                                <asp:Label runat="server" ID="Label9" Text='<%#DataBinder.Eval(Container.DataItem,"Date","{0:f}") %>'></asp:Label>
                            </td>
                            <td align="left">
                                <asp:Label runat="server" ID="lblLocation" Text='<%#DataBinder.Eval(Container.DataItem,"Location") %>'></asp:Label>
                            </td>
                            <td align="right">
                                <img src='Teams/<%#DataBinder.Eval(Container.DataItem,"Local") %>.jpg' border="1" />
                            </td>
                            <td align="left" nowrap="nowrap">
                                <asp:Label runat="server" ID="lblVisitor" Text='<%#DataBinder.Eval(Container.DataItem,"Local") %>'></asp:Label>
                            </td>
                            <td align="center">
                                <asp:Label runat="server" ID="Label3" Text='<%#DataBinder.Eval(Container.DataItem,"LocalGoals") %>'></asp:Label>
                            </td>
                            <td align="right">
                                <img src='Teams/<%#DataBinder.Eval(Container.DataItem,"Visitor") %>.jpg' border="1" />
                            </td>
                            <td align="left" nowrap="nowrap">
                                <asp:Label runat="server" ID="Label17" Text='<%#DataBinder.Eval(Container.DataItem,"Visitor") %>'></asp:Label>
                            </td>
                            <td align="center">
                                <asp:Label runat="server" ID="Label18" Text='<%#DataBinder.Eval(Container.DataItem,"VisitorGoals") %>'></asp:Label>
                            </td>
                        </tr>
                        <tr height="3">
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </div>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td align="right">
                &nbsp;
                <asp:Button runat="server" ID="cmdCreateProject" Text="Guardar" OnClick="cmdCreateProject_Click"
                    Height="63px" Width="102px" />
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td align="left">
                <asp:Button runat="server" ID="cmdDelete" Text="Borrar Ultimo" OnClick="cmdDelete_Click" />
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td align="right">
                <asp:Repeater runat="server" ID="lstScores" OnItemDataBound="lstScores_ItemDataBound">
                    <HeaderTemplate>
                        <table border="0" bordercolor="gray" cellpadding="3" cellspacing="0" width="800px">
                            <tr>
                                <td class="TableTitles">
                                    #
                                </td>
                                <td>
                                    Jugado
                                </td>
                                <td align="center" nowrap="nowrap">
                                    <asp:Label ID="Label8" runat="server" Text="<% $ Resources:Resource,Date %>" CssClass="TableTitles"></asp:Label>
                                </td>
                                <td align="center" nowrap="nowrap">
                                    <asp:Label ID="Label2" runat="server" Text="<% $ Resources:Resource, Location %>"
                                        CssClass="TableTitles"></asp:Label>
                                </td>
                                <td>
                                </td>
                                <td align="center">
                                    <asp:Label ID="Label4" runat="server" Text="<% $ Resources:Resource, Team %>" CssClass="TableTitles"></asp:Label>
                                </td>
                                <td>
                                    Goles
                                </td>
                                <td>
                                </td>
                                <td align="center">
                                    <asp:Label ID="Label6" runat="server" Text="<% $ Resources:Resource, Team %>" CssClass="TableTitles"></asp:Label>
                                </td>
                                <td>
                                    Goles
                                </td>
                            </tr>
                    </HeaderTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                    <ItemTemplate>
                        <tr runat="server" id="row">
                            <td align="center">
                                <%# Container.ItemIndex + 1 %>
                            </td>
                            <td>
                                <asp:CheckBox runat="server" ID="chkEnabled" />
                            </td>
                            <td align="left" nowrap="nowrap">
                                <asp:Label runat="server" ID="Label9" Text='<%#DataBinder.Eval(Container.DataItem,"Date","{0:f}") %>'></asp:Label>
                            </td>
                            <td align="left">
                                <asp:Label runat="server" ID="lblLocation" Text='<%#DataBinder.Eval(Container.DataItem,"Location") %>'></asp:Label>
                            </td>
                            <td align="right">
                                <img src='Teams/<%#DataBinder.Eval(Container.DataItem,"Local") %>.jpg' border="1" />
                            </td>
                            <td align="left" nowrap="nowrap">
                                <asp:Label runat="server" ID="lblVisitor" Text='<%#DataBinder.Eval(Container.DataItem,"Local") %>'></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txtLocalGoals" Width="40px" CssClass="Goals"></asp:TextBox>
                            </td>
                            <td align="right">
                                <img src='Teams/<%#DataBinder.Eval(Container.DataItem,"Visitor") %>.jpg' border="1" />
                            </td>
                            <td align="left" nowrap="nowrap">
                                <asp:Label runat="server" ID="Label17" Text='<%#DataBinder.Eval(Container.DataItem,"Visitor") %>'></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txtVisitorGoals" Width="40px" CssClass="Goals"></asp:TextBox>
                            </td>
                        </tr>
                        <tr height="3">
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </td>
        </tr>
    </table>
</asp:Content>
